const routeName = 'hospSet';
import { Layout } from '@/router/constant';
import { SettingOutlined } from '@vicons/antd';
import { renderIcon } from '@/utils/index';

const routes = [
  {
    path: '/hospSet',
    name: routeName,
    redirect: '/hospSet/list',
    component: Layout,
    meta: {
      title: '医院设置管理',
      icon: renderIcon(SettingOutlined),
      sort: 1,
    },
    children: [
      {
        path: 'list',
        name: `${routeName}_list`,
        meta: {
          title: '医院设置列表'
        },
        component: () => import('@/views/hospset/list.vue'),
      },
      {
        path: 'add',
        name: `${routeName}_add`,
        meta: {
          title: '医院设置添加',
          keepAlive: true
        },
        component: () => import('@/views/hospset/add.vue'),
      },
      {
        path: 'hospital/list',
        name: `${routeName}_hospital_list`,
        meta: {
          title: '医院列表'
        },
        component: () => import('@/views/hospital/list.vue'),
      },
      {
        path: 'schedule/:hoscode',
        name: `${routeName}_hospital_schedule`,
        meta: {
          title: '医院排班',
          hidden: true,
          activeMenu: `${routeName}_hospital_list`
        },
        component: () => import('@/views/hospital/schedule.vue'),
      },
    ],
  },
];

export default routes;